var elements = document.getElementsByClassName("checked");
if (undefined != elements) {
    for (i = 0, len = elements.length; i < len; i++) {
        elements[i].checked = true;
    }
}
